package org.domus.sipnmove.useragent.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import org.domus.sipnmove.useragent.UserAgent;

/**
 * Call button action listener
 */
public class CallButtonActionListener implements ActionListener {

	private UserAgent userAgent;
	private UserAgentView userAgentView;

	public CallButtonActionListener(UserAgent userAgent, UserAgentView userAgentView) {
		this.userAgent = userAgent;
		this.userAgentView = userAgentView;

	}

	@Override
	public void actionPerformed(ActionEvent e) {

		String addressText = userAgentView.getAddressText();

		userAgent.createCall(addressText);

	}

}
